import {Injectable} from '@angular/core';
import {ApiService, ServerConfigService} from '../../../ng-tools';
import {HttpClient} from '@angular/common/http';

@Injectable()
export class MenuService extends ApiService {
  constructor(http: HttpClient, serverConfig: ServerConfigService) {
    super(http, serverConfig);
    this.baseUrl = '/iacs/menu/';
    this.urls = {
      paginationUrl: '',
      menuTree: 'tree/',
      authMenu: 'auth_menu/',
    };
  }

  menuTree() {
    return this.get(this.urls.menuTree);
  }
}
